package com.qzimp.fujiancuo.config;

import com.mybatisflex.core.audit.AuditManager;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;

public class MyBatisFlexConfiguration {
    private static final Logger logger = LoggerFactory
            .getLogger("mybatis-flex-sql");

    public MyBatisFlexConfiguration(){
        AuditManager.setAuditEnable(true);

        AuditManager.setMessageCollector(auditMessage ->
                logger.info("{},{}ms", auditMessage.getFullSql()
                , auditMessage.getElapsedTime()));
    }
}
